package structural.composite;

public class CompositePattern {
    public static void main(String[] args) {
        Group group1 = new Group();
        group1.add(new Shape());
        group1.add(new Shape());

        Group group2 = new Group();
        group2.add(new Shape());
        group2.add(new Shape());

        Group mainGroup = new Group();
        mainGroup.add(group1);
        mainGroup.add(group2);
        mainGroup.draw();
        mainGroup.move();
    }
}
